package com.example.selenium.enums;

public enum BussinessEnum {
    CODE_1002996("1002996","干线普货运输"),
    CODE_1003997("1003997","城市配送"),
    CODE_1003998("1003998","农村配送"),
    CODE_1002998("1002998","集装箱运输"),
    CODE_1003999("1003999","其他");


    private String code;
    private String desc;


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    BussinessEnum(String code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(String code){
        for (int i = 0; i < BussinessEnum.values().length; i++) {
            if (BussinessEnum.values()[i].getCode().equals(code)) {
                return BussinessEnum.values()[i].getDesc();
            }
        }
        return "";
    }
}
